﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using EntityFrameWorkTest;

namespace ConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            var context = new MyDbContext();

            foreach (var model in context.MyModels)
            {
                Console.WriteLine(string.Format("{0}: {1}, {2}", model.Id, model.Prop1, model.Prop2));
            }

            var newModel = new MyModel();
            newModel.Prop1 = "seze";
            newModel.Prop2 = "qsqs";
            context.MyModels.Add(newModel);
            context.SaveChanges();


            Console.ReadKey();
        }
    }
}
